package com.shuimin.service;

import com.shuimin.service.service.sys.SysRoles;
import pond.common.S;
import pond.web.EndToEndException;

public class AccessDeniedException extends EndToEndException {

  public AccessDeniedException(SysRoles.Roles... roles) {
    super(403, "缺少权限：" + S._tap(new StringBuilder(), b -> S._for(roles).each(r -> b.append(r.toString()).append(" "))).toString());
  }

  public AccessDeniedException() {
    super(403, "拒绝访问");
  }

  public AccessDeniedException(String message) {
    super(403, message);
  }
}
